/**
 * @Title: FileController
 * @Package cn.com.yiqi.wsc.portal.controller.file
 * @Description: TODO
 * Copyright: Copyright (c) 2016
 * Company: 成都壹柒互动科技有限公司
 * @author 会员系统组-胥钰淋
 * @date 2017/3/1 11:36
 * @version V1.0
 */
package cn.com.yiqi.wsc.portal.controller.file;

import cn.com.yiqi.wsc.common.Result;
import cn.com.yiqi.wsc.service.file.FileService;
import cn.com.yiqi.wsc.service.file.dataobject.FileDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 *
 *@ClassName: FileController
 * @Description: TODO
 * @author 会员系统组-胥钰淋
 * @date 2017/3/1 11:36
 *
 */
@Controller
@RequestMapping("/file")
public class FileController {

    @Autowired
    private FileService fileService;

    @RequestMapping(value = "/upload", method = RequestMethod.POST)
    @ResponseBody
    public Result process(HttpServletRequest request) throws Exception {
        Result result = new Result();

        List<FileDO> list =  fileService.upload(request);

        result.setReturnValue(list);

        return result;
    }

}
